<?php
$cs = Yii::app ()->clientScript;
// cs -> registerCoreScript('jquery');

$cs->registerCssFile ( '/css/player.css' );
$cs->registerScriptFile ( '/javascripts/jquery-ui-1.8.17.custom.min.js', CClientScript::POS_END );
$cs->registerScriptFile ( '/javascripts/player.js', CClientScript::POS_END );
?>
<div id="background"></div>

<div id="player">
	<div class="cover"></div>
	
	<div class="ctrl">
		<div class="tag">
			<strong>Title</strong> <span class="artist">Artist</span> <span
				class="album">Album</span>
		</div>
		<div class="control">
			<div class="left">
				<div class="rewind icon"></div>
				<div class="playback icon"></div>
				<div class="fastforward icon"></div>
			</div>
			<div class="volume right">
				<div class="mute icon left"></div>
				<div class="slider left">
					<div class="pace"></div>
				</div>
			</div>
		</div>
		<div class="progress">
			<div class="slider">
				<div class="loaded"></div>
				<div class="pace"></div>
			</div>
			<div class="timer left">0:00</div>
			<div class="right">
				<div class="repeat icon"></div>
				<div class="shuffle icon"></div>
			</div>
		</div>
	</div>
	
	
	
	<?php
	if (! $like_model || $like_model->isNewRecord) {
		$like_action = "like";
		$data = 'audio_id=' . $audio_model->audio_saltid . '&like=1';
	} else {
		$like_action = "liked";
		$data = 'audio_id=' . $audio_model->audio_saltid . '&like=0';
	}
	echo CHtml::ajaxLink ( $like_action, array ('/play/audio/like' ), array ('success' => 'function(){}', 'data' => $data, 'type' => 'POST' ), array ('confirm' => 'are u sure?' ,'class'=>'btn btn-info') );
	?>
	
	<?php
	//添加收藏
	echo CHtml::ajaxLink ( 'add', array ('/play/audio/like' ), array ('success' => 'function(){}', 'data' => $data, 'type' => 'POST' ), array ('confirm' => 'are u sure?','class'=>'btn btn-primary') );
	?>
	
	
<div class="bdsharebuttonbox"><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a><a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a><a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a><a href="#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>	
	
</div>
<ul id="playlist" style="margin-top: 80px;"></ul>

<script>
	var mp3file = <?php echo $mp3file;?>
</script>
